<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlterLocationAddMoneyType extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_location', function (Blueprint $table) {
            $table->unsignedTinyInteger('monthlyRent')->default(0)->after("shopDetailAddress")
                  ->comment("0: 月租金 1: 纯扣百分比 2: 月租+百分比 3:月租纯扣取最高");
            $table->string('rentPer', 10)->default('')->after("shopDetailAddress")->comment("月租金百分比");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_location', function (Blueprint $table) {
            $table->dropColumn('monthlyRent');
            $table->dropColumn('rentPer');
        });
    }
}
